package com.example.administrator.fangbook.utils;

import android.content.Context;

import com.example.administrator.fangbook.appliction.HtlApplication;

public class AndroidUtils {
    /**
     * dip转px
     *
     * @param dipValue
     * @return
     */
    public static float dip2px(float dipValue) {
        final float scale = HtlApplication.getApplication().getResources().getDisplayMetrics().density;
        return dipValue * scale + 0.5f;
    }
}
